<template>
<header class="app-header">
  <div class="container">
    <h1 class="logo"><router-link to="/">树宁商城</router-link></h1>
   <app-header-nav/>
    <div class="search">
      <i class="iconfont icon-search"></i>
      <input type="text" placeholder="搜一搜">
    </div>
    <app-header-cart/>
  </div>
</header>
</template>

<script>

import {defineComponent} from "vue";
import AppHeaderNav from "@/components/app-header-nav.vue";
import AppHeaderCart from "@/components/app-header-cart.vue";

export default defineComponent({
  components: {AppHeaderCart, AppHeaderNav}
})
</script>

<style scoped lang="less">
.app-header{
  background-color: #fff;
  .container{
    display: flex;
    align-items: center;
  }
  .logo{
    width: 200px;
    a{
      display: block;
      width: 100%;
      height: 132px;
      text-indent: -999px;
      background: url(../assets/images/logo.svg) no-repeat center/130%;
    }
  }

  .search {
    width: 170px;
    height: 32px;
    position: relative;
    border-bottom: 1px solid #e7e7e7;
    line-height: 32px;
    .icon-search {
      font-size: 18px;
      margin-left: 5px;
    }
    input {
      width: 140px;
      padding-left: 5px;
      color: #666;
    }
  }
  .cart {
    width: 50px;
    .curr {
      height: 32px;
      line-height: 32px;
      text-align: center;
      position: relative;
      display: block;
      .icon-cart{
        font-size: 22px;
      }
      em {
        font-style: normal;
        position: absolute;
        right: 0;
        top: 0;
        padding: 1px 6px;
        line-height: 1;
        background: @helpColor;
        color: #fff;
        font-size: 12px;
        border-radius: 10px;
        font-family: Arial;
      }
    }
  }
}

</style>
